import Vue from 'vue'
import Vuex from 'vuex'
import home from './modules/home'
import search from './modules/search'
import detail from './modules/detail';
import cart from './modules/cart'
import user from './modules/user'
import order from './modules/order'

//安装插件
Vue.use(Vuex);

const state = {};
const mutations = {};
const actions = {};
const getters = {};
const modules = {
  home,search,detail,cart,user,order
};

//建仓库
export default  new Vuex.Store({
  state,
  mutations,
  actions,
  getters,
  modules,
})